package com.itcast.myrpc.server;

import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;

/**
 * @program: bio_tcp
 * @description: channelHandler放入到队列中, 这个等效于
 * netty线程模型中的pipeline,加入到处理队列中去
 * @author: zhanghz001
 * @create: 2021-02-22 08:41
 **/
public class MyChannelInitializer extends ChannelInitializer<SocketChannel> {
    
    @Override
    protected void initChannel(SocketChannel socketChannel) throws Exception {
        //把业务处理器加入到列表中
        socketChannel.pipeline().addLast(new MyChannelHandler());
    }
}
